#include <stdio.h>
#include <stdlib.h>
#include "double_list.h"

int main(int argc, char *argv[])
{
    _DList head = create_list();
    _DNode *node = NULL;
    int i = 0;

    for(i; i < 10; i++)
    {
	printf("please input a number:\n");
	node = create_node();
	scanf("%d", &(node->elem));
	insert_to_tail(head, node);
    }

    for (node = head->next; node != NULL; node = node->next)
    {
	printf("%d\n", node->elem);
    }

    printf("please input the node you want to delete:\n");
    node = create_node();
    scanf("%d", &(node->elem));
    delete_node(head, node);
    for (node = head->next; node != NULL; node = node->next)
    {
	printf("%d\n", node->elem);
    }
    return 0;
}

   
